package com.example.kugou.controller;

import com.example.kugou.pojo.Singer_category;
import com.example.kugou.service.Singer_categoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@Api(tags = "歌手类别的方法",description = "提供歌手类别相关的Rest API")
public class Singer_categoryController {

    @Resource
    Singer_categoryService singer_categoryService;

    public Singer_categoryService getsinger_categoryService() {
        return singer_categoryService;
    }

    public void setsinger_categoryService(Singer_categoryService singer_categoryService) {
        this.singer_categoryService = singer_categoryService;
    }

    @RequestMapping("/selectAllCate")
    @ApiOperation("查询全部的歌手类别的方法")
    public Map<String,Object> selectAll(){
        Map<String,Object> map = new HashMap<>();
        List<Singer_category> singer_categories = singer_categoryService.select();
        map.put("singer_categories",singer_categories);
        return map;
    }

}
